<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
                      "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
  <head> 
    <title>Notification Example</title> 
 
    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script> 
    <script type="text/javascript" charset="utf-8"> 
 
    // Wait for PhoneGap to load 
    // 
    function onLoad() { 
        document.addEventListener("deviceready", onDeviceReady, false); 
    } 
 
    // PhoneGap is ready 
    // 
    function onDeviceReady() { 
        // Empty 
    }
    
    
    // alert dialog dismissed 
    function alertDismissed() { 
        // do something 
    } 
 
    // Show a custom alert 
    // 
    function showAlert() { 
        navigator.notification.alert( 
            'You are the winner!',  // message 
            alertDismissed,         // callback 
            'Game Over',            // title 
            'Done'                  // buttonName 
        ); 
    } 
    
    
    // process the confirmation dialog result 
    function onConfirm(button) { 
        alert('You selected button ' + button); 
    } 
 
    // Show a custom confirmation dialog 
    // 
    function showConfirm() { 
        navigator.notification.confirm( 
            'You are the winner!',  // message 
            onConfirm,              // callback to invoke with index of button pressed 
            'Game Over',            // title 
            'Restart,Exit'          // buttonLabels 
        ); 
    } 
    
    // Beep three times 
    // 
    function playBeep() { 
        navigator.notification.beep(3); 
    } 
    
    // Vibrate for 2 seconds 
    // 
    function vibrate() { 
        navigator.notification.vibrate(2000); 
    } 
    
    </script> 
  </head> 
  <body onload="onLoad()">
	<p><a href="#" onclick="showAlert(); return false;">Show Alert</a></p> 
	<p><a href="#" onclick="showConfirm(); return false;">Show Confirm</a></p>
	<p><a href="#" onclick="playBeep(); return false;">Play Beep</a></p> 
	<p><a href="#" onclick="vibrate(); return false;">Vibrate</a></p> 
  </body> 
</html> 
